package AppConfig

import (
	"fmt"

	"github.com/spf13/viper"
)

type Mysql struct {
	Host     string
	Post     int
	User     string
	Password string
	Database string
}

type Appconfig struct {
	Mysql Mysql
}

var Config Appconfig

func Iiit() {
	viper.SetConfigFile("AppConfig/dev.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&Config)
	fmt.Println("配置成功", Config)
}
